﻿<s:SurfaceWindow x:Class="SurfaceVEMapSample.SurfaceVEMapSampleWindow"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:s="http://schemas.microsoft.com/surface/2008"
                 xmlns:map="clr-namespace:InfoStrat.VE.NUI;assembly=InfoStrat.VE.NUI"
                 Title="Surface VEMap Sample"
                 Width="1024"
                 Height="768">
    <s:SurfaceWindow.Resources>
        <ImageBrush x:Key="WindowBackground"
                    Stretch="None"
                    Opacity="0.6"
                    ImageSource="pack://application:,,,/Resources/WindowBackground.jpg" />
    </s:SurfaceWindow.Resources>

    <Grid Background="{StaticResource WindowBackground}"
          TextBlock.Foreground="Black">
        <map:SurfaceVEMap x:Name="map"
                          MapStyle="Hybrid"
                          LatLong="38.9444195081574,-77.0630161230201"
                          MapLoaded="map_MapLoaded">
            <map:SurfaceVEPushPin Latitude="38.9444195081574"
                                  Longitude="-77.0630161230201"
                                  Click="SurfacePushPin_Click">
                <StackPanel>
                    <TextBlock Text="Hello, Surface!"
                               HorizontalAlignment="Center"
                               FontSize="20" />
                    <TextBlock Text="www.infostrat.com"
                               HorizontalAlignment="Center" />
                </StackPanel>
            </map:SurfaceVEPushPin>
            <map:ExpandingSurfaceVEPushPin Latitude="38.9444195081574"
                                           Longitude="-78.0630161230201">
                <TextBlock Text="Title" />
                <map:ExpandingSurfaceVEPushPin.Details>
                    <StackPanel>
                        <TextBlock Text="Details" />
                        <s:SurfaceButton Content="button"
                                         Width="100"
                                         Height="60"
                                         Click="SurfaceButton_Click" />
                    </StackPanel>
                </map:ExpandingSurfaceVEPushPin.Details>
            </map:ExpandingSurfaceVEPushPin>
        </map:SurfaceVEMap>
        <DockPanel Margin="20,10,0,10">
            <Border DockPanel.Dock="Left"
                    CornerRadius="20"
                    Background="#AAFFFFFF">
                <s:SurfaceScrollViewer Margin="20">
                    <StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Lat/Long: "
                                       Margin="0,0,10,0" />
                            <s:SurfaceTextBox Name="txtLong"
                                              Width="200"
                                              Text="{Binding ElementName=map, Path=LatLong}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Altitude: "
                                       Margin="0,0,10,0" />
                            <s:SurfaceTextBox Name="txtAltitude"
                                              Width="200"
                                              Text="{Binding ElementName=map, Path=Altitude}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Roll: "
                                       Margin="0,0,10,0" />
                            <s:SurfaceTextBox Name="txtRoll"
                                              Width="200"
                                              Text="{Binding ElementName=map, Path=Roll}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Pitch: "
                                       Margin="0,0,10,0" />
                            <s:SurfaceTextBox Name="txtPitch"
                                              Width="200"
                                              Text="{Binding ElementName=map, Path=Pitch}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Yaw: "
                                       Margin="0,0,10,0" />
                            <s:SurfaceTextBox Name="txtYaw"
                                              Width="200"
                                              Text="{Binding ElementName=map, Path=Yaw}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Show 3D Cursor: "
                                       Margin="0,0,10,0" />
                            <s:SurfaceCheckBox Name="cbxCursor"
                                               VerticalAlignment="Center"
                                               IsChecked="{Binding ElementName=map, Path=Show3DCursor}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Show Buildings: "
                                       Margin="0,0,10,0" />
                            <s:SurfaceCheckBox Name="cbxBuildings"
                                               VerticalAlignment="Center"
                                               IsChecked="{Binding ElementName=map, Path=ShowBuildings}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Show Building Textures: "
                                       Margin="0,0,10,0" />
                            <s:SurfaceCheckBox Name="cbxBuildingTextures"
                                               VerticalAlignment="Center"
                                               IsChecked="{Binding ElementName=map, Path=ShowBuildingTextures}" />
                        </StackPanel>

                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Style: "
                                       Margin="0,0,10,0" />
                            <s:SurfaceTextBox Name="txtStyle"
                                              Width="200"
                                              Text="{Binding ElementName=map, Path=MapStyle}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal"
                                    Margin="10"
                                    HorizontalAlignment="Center">
                            <s:SurfaceButton Name="btnStyleRoad"
                                             Click="btnStyleRoad_Click">Road</s:SurfaceButton>
                            <s:SurfaceButton Name="btnStyleHybrid"
                                             Margin="10,0,10,0"
                                             Click="btnStyleHybrid_Click">Hybrid</s:SurfaceButton>
                            <s:SurfaceButton Name="btnStyleAerial"
                                             Click="btnStyleAerial_Click">Aerial</s:SurfaceButton>
                        </StackPanel>
                        <s:SurfaceButton HorizontalAlignment="Center"
                                         Margin="10"
                                         Name="btnUp"
                                         Content="Up"
                                         Click="btnUp_Click" />
                        <StackPanel Orientation="Horizontal"
                                    HorizontalAlignment="Center"
                                    Margin="0">

                            <s:SurfaceButton HorizontalAlignment="Center"
                                             Margin="10"
                                             Name="btnLeft"
                                             Content="Left"
                                             Click="btnLeft_Click" />

                            <s:SurfaceButton HorizontalAlignment="Center"
                                             Margin="10"
                                             Name="btnDown"
                                             Content="Down"
                                             Click="btnDown_Click" />

                            <s:SurfaceButton HorizontalAlignment="Center"
                                             Margin="10"
                                             Name="btnRight"
                                             Content="Right"
                                             Click="btnRight_Click" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal"
                                    HorizontalAlignment="Center">
                            <s:SurfaceButton HorizontalAlignment="Center"
                                             Margin="10"
                                             Name="btnZoomIn"
                                             Content="Zoom In"
                                             Click="btnZoomIn_Click" />

                            <s:SurfaceButton HorizontalAlignment="Center"
                                             Margin="10"
                                             Name="btnZoomOut"
                                             Content="Zoom Out"
                                             Click="btnZoomOut_Click" />
                        </StackPanel>
                        <StackPanel HorizontalAlignment="Center">
                            <TextBlock Text="Pan Sensitivity:" />
                            <s:SurfaceSlider Minimum="0"
                                             Maximum="10"
                                             SmallChange=".5"
                                             Width="200"
                                             Value="{Binding ElementName=map, Path=PanSensitivity}" />
                            <s:SurfaceTextBox Text="{Binding ElementName=map, Path=PanSensitivity}" />
                        </StackPanel>
                        <StackPanel HorizontalAlignment="Center">
                            <TextBlock Text="Zoom Sensitivity:" />
                            <s:SurfaceSlider Minimum="0"
                                             Maximum="20"
                                             SmallChange=".5"
                                             Width="200"
                                             Value="{Binding ElementName=map, Path=ZoomSensitivity}" />
                            <s:SurfaceTextBox Text="{Binding ElementName=map, Path=ZoomSensitivity}" />
                        </StackPanel>
                        <StackPanel HorizontalAlignment="Center">
                            <TextBlock Text="Tilt Sensitivity:" />
                            <s:SurfaceSlider Minimum="0"
                                             Maximum="1"
                                             SmallChange="0.02"
                                             Width="200"
                                             Value="{Binding ElementName=map, Path=TiltSensitivity}" />
                            <s:SurfaceTextBox Text="{Binding ElementName=map, Path=TiltSensitivity}" />
                        </StackPanel>

                        <StackPanel Orientation="Horizontal"
                                    Margin="0,20,0,0">
                            <TextBlock Text="Map Manipulation Mode:"
                                       VerticalAlignment="Center"
                                       Margin="0,0,10,0" />
                            <TextBlock Text="{Binding ElementName=map, Path=MapManipulationMode}"
                                       VerticalAlignment="Center" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Toggle Tilt mode:"
                                       VerticalAlignment="Center"
                                       Margin="0,0,10,0" />
                            <s:SurfaceToggleButton Name="btnTiltMode"
                                                   VerticalAlignment="Center"
                                                   Click="btnTiltMode_Click"
                                                   Width="130"
                                                   Height="40"
                                                   Content="Toggle Tilt Mode" />
                        </StackPanel>

                        <StackPanel Orientation="Horizontal"
                                    Margin="0,20,0,0">
                            <TextBlock Text="Pan Enabled: "
                                       Margin="0,0,10,0" />
                            <s:SurfaceCheckBox Name="cbxPanEnabled"
                                               VerticalAlignment="Center"
                                               IsChecked="{Binding ElementName=map, Path=IsPanEnabled}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Zoom Enabled: "
                                       Margin="0,0,10,0" />
                            <s:SurfaceCheckBox Name="cbxZoomEnabled"
                                               VerticalAlignment="Center"
                                               IsChecked="{Binding ElementName=map, Path=IsZoomEnabled}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Pivot Enabled: "
                                       Margin="0,0,10,0" />
                            <s:SurfaceCheckBox Name="cbxpivotEnabled"
                                               VerticalAlignment="Center"
                                               IsChecked="{Binding ElementName=map, Path=IsPivotEnabled}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Tilt Enabled: "
                                       Margin="0,0,10,0" />
                            <s:SurfaceCheckBox Name="cbxTiltEnabled"
                                               VerticalAlignment="Center"
                                               IsChecked="{Binding ElementName=map, Path=IsTiltEnabled}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Spin Enabled: "
                                       Margin="0,0,10,0" />
                            <s:SurfaceCheckBox Name="cbxSpinEnabled"
                                               VerticalAlignment="Center"
                                               IsChecked="{Binding ElementName=map, Path=IsSpinEnabled}" />
                        </StackPanel>


                    </StackPanel>
                </s:SurfaceScrollViewer>
            </Border>
            <Grid>
            </Grid>
        </DockPanel>
    </Grid>
</s:SurfaceWindow>
